Опубликовано 30 Jun 2008. Автор: admin
And
there you have it: 30 .NET Windows Mobile Applications in 30 Days!
I really liked yesterday’s application, Community
Megaphone Reader. I think it was because it was a Windows Mobile mashup application.
And we can look forward to many more of these types of applications to come our way.
Trippr
You’ve probably already figured out what this application does. That’s right it takes
your current GPS position and pulls back pictures that are geotagged for the area
you are in. So while you are riding down the road you can flickrscan for photos
taken near you, possibly as close as the block you are on.
Really cool idea I think. I’ll probably hook this up to the dashboard of my car and
just let it run while I drive around. It should be lots of fun to just see what I
see.
The UI is basic sterile white, but I wanted the photos to be the star of the show
so I went with the one uber true neutral color.
Control are very simple: Update, Menu, GPS, GPS
Start, GPS Stop, About, and Exit.
Update is the main feature. Any time it is pressed new photos are downloaded.
Again for this project we looked to the GPS
Intermediate Driver Reference, it has served us well these 30 days and I really
highly recommend it. If you need to do a Windows Mobile GPS application use this and
you are almost done.
Another great API I found is the Flickr.Net
API. If you need to connect to Flickr in .NET or .NET Compact Framework this is
great. It does all the heavy lifting for you! I was up and running in minutes!
“The Flickr.Net API is a .Net Library for accessing the Flickr API. Written entirely
in C# it can be accessed from with any .Net language in .Net Framework 1.1, .Net Framework
2.0, .Net Compact Framework 2.0 and Mono.”
Update Method
1: if (gpsPosition
== null || !gpsPosition.LatitudeValid || !gpsPosition.LongitudeValid)
2: return;
3:
4: double minimumLongitude
= gpsPosition.Longitude - 1;
5: double minimumLatitude
= gpsPosition.Latitude - 1;
6: double maximumLongitude
= gpsPosition.Longitude + 1;
7: double maximumLatitude
= gpsPosition.Latitude + 1;
8:
9: string apikey
= "get_your_own_flickr_key";
10: Flickr
flickr = new Flickr(apikey);
11:
12: PhotoSearchOptions
options = new PhotoSearchOptions();
13: options.BoundaryBox
= new BoundaryBox(minimumLongitude, minimumLatitude,
maximumLongitude, maximumLatitude);
14: options.Extras
|= PhotoSearchExtras.Geo;
15: options.PerPage
= 10;
16: options.SortOrder
= PhotoSearchSortOrder.InterestingnessAsc;
17:
18: Photos
photos = flickr.PhotosSearch(options);
19: StringBuilder
stringBuilder = new StringBuilder();
20:
21: foreach(Photo
photo in photos.PhotoCollection)
22: stringBuilder.AppendFormat(@"<img
src=""{0}""
style=""border: 1px black solid; padding:
0px; margin: 1px"" />",
photo.ThumbnailUrl);
23:
24: webBrowser.DocumentText
= stringBuilder.ToString();
Possibilities:
Obviously this needs an auto-update feature and settings for those of use who will
use it on the road. If I click on a picture I’d love to see a larger view of it as
well. and a details listing telling me more about the photo would be great.
Download executable: trippr.cab
Download Source Code: trippr.zip
Thank You:
I appreciate everyone’s encouragement and feedback. This project would not have been
a success without all of you. Keep an out there’s more to come in the future.

Комментировать »
Рубрики: 30 Day of .NET, Pocket PC, Programming, Smartphone, Windows Mobile, compact framework, cool